using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.Configuration;
using XCode.DataAccessLayer;

namespace HX.Model.Xcode.HXDB
{
    /// <summary></summary>
    [Serializable]
    [DataObject]
    [BindIndex("PK_HX_PRESIDENTMAILBOX", true, "TaskID")]
    [BindTable("HX_PresidentMailbox", Description = "", ConnName = "HXDB", DbType = DatabaseType.SqlServer)]
    public partial class HxPresidentmailbox : IHxPresidentmailbox
    {
        #region 属性
        private Int32 _TaskID;
        /// <summary></summary>
        [DisplayName("TaskID")]
        [DataObjectField(true, false, false, 10)]
        [BindColumn("TaskID", "", "int")]
        public Int32 TaskID { get => _TaskID; set { if (OnPropertyChanging(__.TaskID, value)) { _TaskID = value; OnPropertyChanged(__.TaskID); } } }

        private DateTime _FeedbackDate;
        /// <summary></summary>
        [DisplayName("FeedbackDate")]
        [DataObjectField(false, false, true, 3)]
        [BindColumn("FeedbackDate", "", "datetime", Precision = 0, Scale = 3)]
        public DateTime FeedbackDate { get => _FeedbackDate; set { if (OnPropertyChanging(__.FeedbackDate, value)) { _FeedbackDate = value; OnPropertyChanged(__.FeedbackDate); } } }

        private String _Category;
        /// <summary></summary>
        [DisplayName("Category")]
        [DataObjectField(false, false, true, 100)]
        [BindColumn("Category", "", "nvarchar(100)")]
        public String Category { get => _Category; set { if (OnPropertyChanging(__.Category, value)) { _Category = value; OnPropertyChanged(__.Category); } } }

        private String _FeedbackType;
        /// <summary></summary>
        [DisplayName("FeedbackType")]
        [DataObjectField(false, false, true, 100)]
        [BindColumn("FeedbackType", "", "nvarchar(100)")]
        public String FeedbackType { get => _FeedbackType; set { if (OnPropertyChanging(__.FeedbackType, value)) { _FeedbackType = value; OnPropertyChanged(__.FeedbackType); } } }

        private String _Mobile;
        /// <summary></summary>
        [DisplayName("Mobile")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn("Mobile", "", "nvarchar(50)")]
        public String Mobile { get => _Mobile; set { if (OnPropertyChanging(__.Mobile, value)) { _Mobile = value; OnPropertyChanged(__.Mobile); } } }

        private String _ProblemTitle;
        /// <summary></summary>
        [DisplayName("ProblemTitle")]
        [DataObjectField(false, false, true, 200)]
        [BindColumn("ProblemTitle", "", "nvarchar(200)")]
        public String ProblemTitle { get => _ProblemTitle; set { if (OnPropertyChanging(__.ProblemTitle, value)) { _ProblemTitle = value; OnPropertyChanged(__.ProblemTitle); } } }

        private String _ProblemDetails;
        /// <summary></summary>
        [DisplayName("ProblemDetails")]
        [DataObjectField(false, false, true, 800)]
        [BindColumn("ProblemDetails", "", "nvarchar(800)")]
        public String ProblemDetails { get => _ProblemDetails; set { if (OnPropertyChanging(__.ProblemDetails, value)) { _ProblemDetails = value; OnPropertyChanged(__.ProblemDetails); } } }

        private String _Attachment;
        /// <summary></summary>
        [DisplayName("Attachment")]
        [DataObjectField(false, false, true, 800)]
        [BindColumn("Attachment", "", "nvarchar(800)")]
        public String Attachment { get => _Attachment; set { if (OnPropertyChanging(__.Attachment, value)) { _Attachment = value; OnPropertyChanged(__.Attachment); } } }

        private String _PresidentOpinion;
        /// <summary></summary>
        [DisplayName("PresidentOpinion")]
        [DataObjectField(false, false, true, 800)]
        [BindColumn("PresidentOpinion", "", "nvarchar(800)")]
        public String PresidentOpinion { get => _PresidentOpinion; set { if (OnPropertyChanging(__.PresidentOpinion, value)) { _PresidentOpinion = value; OnPropertyChanged(__.PresidentOpinion); } } }

        private String _OfficeOpinion;
        /// <summary></summary>
        [DisplayName("OfficeOpinion")]
        [DataObjectField(false, false, true, 800)]
        [BindColumn("OfficeOpinion", "", "nvarchar(800)")]
        public String OfficeOpinion { get => _OfficeOpinion; set { if (OnPropertyChanging(__.OfficeOpinion, value)) { _OfficeOpinion = value; OnPropertyChanged(__.OfficeOpinion); } } }

        private String _OfficeResult;
        /// <summary></summary>
        [DisplayName("OfficeResult")]
        [DataObjectField(false, false, true, 800)]
        [BindColumn("OfficeResult", "", "nvarchar(800)")]
        public String OfficeResult { get => _OfficeResult; set { if (OnPropertyChanging(__.OfficeResult, value)) { _OfficeResult = value; OnPropertyChanged(__.OfficeResult); } } }

        private Int32 _IsOpen;
        /// <summary></summary>
        [DisplayName("IsOpen")]
        [DataObjectField(false, false, true, 10)]
        [BindColumn("IsOpen", "", "int")]
        public Int32 IsOpen { get => _IsOpen; set { if (OnPropertyChanging(__.IsOpen, value)) { _IsOpen = value; OnPropertyChanged(__.IsOpen); } } }

        private Int32 _F1;
        /// <summary></summary>
        [DisplayName("F1")]
        [DataObjectField(false, false, true, 10)]
        [BindColumn("F1", "", "int")]
        public Int32 F1 { get => _F1; set { if (OnPropertyChanging(__.F1, value)) { _F1 = value; OnPropertyChanged(__.F1); } } }

        private Int32 _F2;
        /// <summary></summary>
        [DisplayName("F2")]
        [DataObjectField(false, false, true, 10)]
        [BindColumn("F2", "", "int")]
        public Int32 F2 { get => _F2; set { if (OnPropertyChanging(__.F2, value)) { _F2 = value; OnPropertyChanged(__.F2); } } }

        private Int32 _F3;
        /// <summary></summary>
        [DisplayName("F3")]
        [DataObjectField(false, false, true, 10)]
        [BindColumn("F3", "", "int")]
        public Int32 F3 { get => _F3; set { if (OnPropertyChanging(__.F3, value)) { _F3 = value; OnPropertyChanged(__.F3); } } }

        private String _LoginAccount;
        /// <summary></summary>
        [DisplayName("LoginAccount")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn("LoginAccount", "", "nvarchar(50)")]
        public String LoginAccount { get => _LoginAccount; set { if (OnPropertyChanging(__.LoginAccount, value)) { _LoginAccount = value; OnPropertyChanged(__.LoginAccount); } } }

        private String _Applicant;
        /// <summary></summary>
        [DisplayName("Applicant")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn("Applicant", "", "nvarchar(50)")]
        public String Applicant { get => _Applicant; set { if (OnPropertyChanging(__.Applicant, value)) { _Applicant = value; OnPropertyChanged(__.Applicant); } } }

        private String _ProblemType;
        /// <summary></summary>
        [DisplayName("ProblemType")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn("ProblemType", "", "nvarchar(50)")]
        public String ProblemType { get => _ProblemType; set { if (OnPropertyChanging(__.ProblemType, value)) { _ProblemType = value; OnPropertyChanged(__.ProblemType); } } }

        private Int32 _IsRejected;
        /// <summary></summary>
        [DisplayName("IsRejected")]
        [DataObjectField(false, false, true, 10)]
        [BindColumn("IsRejected", "", "int")]
        public Int32 IsRejected { get => _IsRejected; set { if (OnPropertyChanging(__.IsRejected, value)) { _IsRejected = value; OnPropertyChanged(__.IsRejected); } } }

        private String _OfficeHandler;
        /// <summary></summary>
        [DisplayName("OfficeHandler")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn("OfficeHandler", "", "varchar(50)")]
        public String OfficeHandler { get => _OfficeHandler; set { if (OnPropertyChanging(__.OfficeHandler, value)) { _OfficeHandler = value; OnPropertyChanged(__.OfficeHandler); } } }
        #endregion

        #region 获取/设置 字段值
        /// <summary>获取/设置 字段值</summary>
        /// <param name="name">字段名</param>
        /// <returns></returns>
        public override Object this[String name]
        {
            get
            {
                switch (name)
                {
                    case __.TaskID: return _TaskID;
                    case __.FeedbackDate: return _FeedbackDate;
                    case __.Category: return _Category;
                    case __.FeedbackType: return _FeedbackType;
                    case __.Mobile: return _Mobile;
                    case __.ProblemTitle: return _ProblemTitle;
                    case __.ProblemDetails: return _ProblemDetails;
                    case __.Attachment: return _Attachment;
                    case __.PresidentOpinion: return _PresidentOpinion;
                    case __.OfficeOpinion: return _OfficeOpinion;
                    case __.OfficeResult: return _OfficeResult;
                    case __.IsOpen: return _IsOpen;
                    case __.F1: return _F1;
                    case __.F2: return _F2;
                    case __.F3: return _F3;
                    case __.LoginAccount: return _LoginAccount;
                    case __.Applicant: return _Applicant;
                    case __.ProblemType: return _ProblemType;
                    case __.IsRejected: return _IsRejected;
                    case __.OfficeHandler: return _OfficeHandler;
                    default: return base[name];
                }
            }
            set
            {
                switch (name)
                {
                    case __.TaskID: _TaskID = value.ToInt(); break;
                    case __.FeedbackDate: _FeedbackDate = value.ToDateTime(); break;
                    case __.Category: _Category = Convert.ToString(value); break;
                    case __.FeedbackType: _FeedbackType = Convert.ToString(value); break;
                    case __.Mobile: _Mobile = Convert.ToString(value); break;
                    case __.ProblemTitle: _ProblemTitle = Convert.ToString(value); break;
                    case __.ProblemDetails: _ProblemDetails = Convert.ToString(value); break;
                    case __.Attachment: _Attachment = Convert.ToString(value); break;
                    case __.PresidentOpinion: _PresidentOpinion = Convert.ToString(value); break;
                    case __.OfficeOpinion: _OfficeOpinion = Convert.ToString(value); break;
                    case __.OfficeResult: _OfficeResult = Convert.ToString(value); break;
                    case __.IsOpen: _IsOpen = value.ToInt(); break;
                    case __.F1: _F1 = value.ToInt(); break;
                    case __.F2: _F2 = value.ToInt(); break;
                    case __.F3: _F3 = value.ToInt(); break;
                    case __.LoginAccount: _LoginAccount = Convert.ToString(value); break;
                    case __.Applicant: _Applicant = Convert.ToString(value); break;
                    case __.ProblemType: _ProblemType = Convert.ToString(value); break;
                    case __.IsRejected: _IsRejected = value.ToInt(); break;
                    case __.OfficeHandler: _OfficeHandler = Convert.ToString(value); break;
                    default: base[name] = value; break;
                }
            }
        }
        #endregion

        #region 字段名
        /// <summary>取得HxPresidentmailbox字段信息的快捷方式</summary>
        public partial class _
        {
            /// <summary></summary>
            public static readonly Field TaskID = FindByName(__.TaskID);

            /// <summary></summary>
            public static readonly Field FeedbackDate = FindByName(__.FeedbackDate);

            /// <summary></summary>
            public static readonly Field Category = FindByName(__.Category);

            /// <summary></summary>
            public static readonly Field FeedbackType = FindByName(__.FeedbackType);

            /// <summary></summary>
            public static readonly Field Mobile = FindByName(__.Mobile);

            /// <summary></summary>
            public static readonly Field ProblemTitle = FindByName(__.ProblemTitle);

            /// <summary></summary>
            public static readonly Field ProblemDetails = FindByName(__.ProblemDetails);

            /// <summary></summary>
            public static readonly Field Attachment = FindByName(__.Attachment);

            /// <summary></summary>
            public static readonly Field PresidentOpinion = FindByName(__.PresidentOpinion);

            /// <summary></summary>
            public static readonly Field OfficeOpinion = FindByName(__.OfficeOpinion);

            /// <summary></summary>
            public static readonly Field OfficeResult = FindByName(__.OfficeResult);

            /// <summary></summary>
            public static readonly Field IsOpen = FindByName(__.IsOpen);

            /// <summary></summary>
            public static readonly Field F1 = FindByName(__.F1);

            /// <summary></summary>
            public static readonly Field F2 = FindByName(__.F2);

            /// <summary></summary>
            public static readonly Field F3 = FindByName(__.F3);

            /// <summary></summary>
            public static readonly Field LoginAccount = FindByName(__.LoginAccount);

            /// <summary></summary>
            public static readonly Field Applicant = FindByName(__.Applicant);

            /// <summary></summary>
            public static readonly Field ProblemType = FindByName(__.ProblemType);

            /// <summary></summary>
            public static readonly Field IsRejected = FindByName(__.IsRejected);

            /// <summary></summary>
            public static readonly Field OfficeHandler = FindByName(__.OfficeHandler);

            static Field FindByName(String name) => Meta.Table.FindByName(name);
        }

        /// <summary>取得HxPresidentmailbox字段名称的快捷方式</summary>
        public partial class __
        {
            /// <summary></summary>
            public const String TaskID = "TaskID";

            /// <summary></summary>
            public const String FeedbackDate = "FeedbackDate";

            /// <summary></summary>
            public const String Category = "Category";

            /// <summary></summary>
            public const String FeedbackType = "FeedbackType";

            /// <summary></summary>
            public const String Mobile = "Mobile";

            /// <summary></summary>
            public const String ProblemTitle = "ProblemTitle";

            /// <summary></summary>
            public const String ProblemDetails = "ProblemDetails";

            /// <summary></summary>
            public const String Attachment = "Attachment";

            /// <summary></summary>
            public const String PresidentOpinion = "PresidentOpinion";

            /// <summary></summary>
            public const String OfficeOpinion = "OfficeOpinion";

            /// <summary></summary>
            public const String OfficeResult = "OfficeResult";

            /// <summary></summary>
            public const String IsOpen = "IsOpen";

            /// <summary></summary>
            public const String F1 = "F1";

            /// <summary></summary>
            public const String F2 = "F2";

            /// <summary></summary>
            public const String F3 = "F3";

            /// <summary></summary>
            public const String LoginAccount = "LoginAccount";

            /// <summary></summary>
            public const String Applicant = "Applicant";

            /// <summary></summary>
            public const String ProblemType = "ProblemType";

            /// <summary></summary>
            public const String IsRejected = "IsRejected";

            /// <summary></summary>
            public const String OfficeHandler = "OfficeHandler";
        }
        #endregion
    }

    /// <summary>接口</summary>
    public partial interface IHxPresidentmailbox
    {
        #region 属性
        /// <summary></summary>
        Int32 TaskID { get; set; }

        /// <summary></summary>
        DateTime FeedbackDate { get; set; }

        /// <summary></summary>
        String Category { get; set; }

        /// <summary></summary>
        String FeedbackType { get; set; }

        /// <summary></summary>
        String Mobile { get; set; }

        /// <summary></summary>
        String ProblemTitle { get; set; }

        /// <summary></summary>
        String ProblemDetails { get; set; }

        /// <summary></summary>
        String Attachment { get; set; }

        /// <summary></summary>
        String PresidentOpinion { get; set; }

        /// <summary></summary>
        String OfficeOpinion { get; set; }

        /// <summary></summary>
        String OfficeResult { get; set; }

        /// <summary></summary>
        Int32 IsOpen { get; set; }

        /// <summary></summary>
        Int32 F1 { get; set; }

        /// <summary></summary>
        Int32 F2 { get; set; }

        /// <summary></summary>
        Int32 F3 { get; set; }

        /// <summary></summary>
        String LoginAccount { get; set; }

        /// <summary></summary>
        String Applicant { get; set; }

        /// <summary></summary>
        String ProblemType { get; set; }

        /// <summary></summary>
        Int32 IsRejected { get; set; }

        /// <summary></summary>
        String OfficeHandler { get; set; }
        #endregion

        #region 获取/设置 字段值
        /// <summary>获取/设置 字段值</summary>
        /// <param name="name">字段名</param>
        /// <returns></returns>
        Object this[String name] { get; set; }
        #endregion
    }
}